<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let json = '{"a":"ha","b":"go"}';
      let obj = JSON.parse(json); // 将json字符串转换成JS对象
      console.log(obj);
      let json1 = JSON.stringify(obj);
      console.log(json1); // 将js对象 转换为json字符串
    </script>
  </body>
</html>
